package com.march.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.march.common.R;
import com.march.entry.Employee;
import com.march.mapper.EmployeeMapper;
import com.march.service.EmployeeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Objects;

/**
 * @auther:
 * @create 10 -- 20:17
 */
@Service
public class EmployeeServiceImpl extends ServiceImpl<EmployeeMapper, Employee> implements EmployeeService{

//    @Resource
//    private AuthenticationManager authenticationManager;

    @Override
    public R securityLogin(Employee employee) {
//        UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(employee.getUsername(), employee.getPassword());
//        Authentication authenticate = authenticationManager.authenticate(authenticationToken);
//        if(Objects.isNull(authenticate)){
////            未通过
//            throw new CustomException("登录失败");
//        }
        return R.success("OK");
    }
}
